package com.tobdev.qywxinner.controller;

import com.tobdev.qywxinner.utils.JsonData;
import com.tobdev.qywxinner.utils.RedisUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Set;

@Slf4j
@RestController
public class TestController {

    @Autowired
    RedisUtils redisUtils;

    @RequestMapping("/t1")
    public JsonData read() {
        Set<String> a = redisUtils.keys("temp:*");
        return JsonData.buildSuccess(a);
    }

    @RequestMapping("/t2")
    public JsonData read2() {
        return JsonData.buildSuccess("aa");
    }

    @RequestMapping("/api/t1")
    public JsonData read3() {
        return JsonData.buildSuccess("aa");
    }

}
